/**
 * $Revision: 1.0 $
 * $Author: Eric Yang $
 * $Date: Aug 24, 2009 11:25:49 PM $
 *
 * Author: Eric Yang
 * Date  : Aug 24, 2009 11:25:49 PM
 *
 */
package com.gooex.service.company;

import java.util.List;
import org.c4j.system.web.page.Page;

import com.gooex.domain.company.Company;
import com.gooex.domain.organization.User;
import com.gooex.service.base.exception.CompanyException;

/**
 * @author Eric Yang
 * @version 1.0
 */
public interface ICompanyManager {
	/***/
	public Company getCompany(String id);

	/***/
	public List<Company> getUserCompanies(User user);

	public long getUserCompanyNum(User user);

	/***/
	public Company getCompanyByName(String name);

	/***/
	public void saveCompany(Company company);

	/***/
	public void removeCompany(Company company) throws CompanyException;

	/***/
	public List<Company> getCompanies();

	public List<Company> findCompaniesByName(String name);

	/**
	 * 获取该用户已通过审核的公司信息
	 */
	public List<Company> getAccreditedCompanies(User user);

	/**
	 * @return the given user's companies info which have been accredited and whoes region is under the given region
	 *         area.
	 */
	public List<Company> getRegionCompanies(User user, String regionId);

	/**
	 * 通过用户id 及公司id获取公司信息
	 */
	public Company getCompany(String userId, String companyId);

	public List<Company> getCompanies(Page page, boolean accredited);
}
